<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	@@include('public/title.html')
	<meta http-equiv="X-UA-Compatible" content="chrome=1,IE=edge">
	<link href="../../css/bootstrap.min.css" rel="stylesheet">
	<link href="css/nifty.min.css" rel="stylesheet">
	<link href="../../css/demo/nifty-demo-icons.min.css" rel="stylesheet">
	<link href="../../plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet">
	<link href="../../plugins/pace/pace.min.css" rel="stylesheet">
	<link href="../../plugins/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css" rel="stylesheet">
	<script src="../../plugins/pace/pace.min.js?2016/8/5"></script>
	<style>
		th,td{
			text-align: center;
		}
	</style>
	<script src="../../js/jquery-2.2.1.min.js"></script>

</head>

<!--TIPS-->
<!--You may remove all ID or Class names which contain "demo-", they are only used for demonstration. -->

<body id="main">
<div id="container" class="effect mainnav-lg">
	@@include('public/header.html')
	
	<div class="boxed">
		<nav id="mainnav-container">
			@@include('public/left_menu.html')
		</nav>
		
		<div id="content-container">
			<div id="page-title">
				<h1 class="page-header text-overflow">订单数据</h1>
				<button class="btn btn-primary" data-toggle="modal" data-target="#myModal">导出数据</button>
			</div>
			
			<div class="page-content">
				<style>
					.page-wrapper{
						padding:20px;
					}
					.page-wrapper > h4{
						margin:7.5px;
						margin-bottom:15px;
					}
					.page-wrapper:after{
						content:"";
						display:block;
						clear: both;
					}
					.eq-box-sm .panel:hover{
						cursor:pointer;
						background:#efefef;
					}
				</style>
				
				<!--回收业务-->
				<div class="page-wrapper">
					<h4>回收订单</h4>
					<div class="col-sm-3 eq-box-sm">
						<div class="panel text-center">
							<h4>全部订单</h4>
							<h3 class="panel-body" v-text="recycleOrder.total"></h3>
						</div>
					</div>
					
					<div class="col-sm-3 eq-box-sm">
						<div class="panel text-center">
							<h4>待处理订单</h4>
							<h3 class="panel-body" v-text="recycleOrder.waiting_handle"></h3>
						</div>
					</div>
					
					<div class="col-sm-3 eq-box-sm">
						<div class="panel text-center">
							<h4>待接单</h4>
							<h3 class="panel-body" v-text="recycleOrder.waiting_list"></h3>
						</div>
					</div>
					
					<div class="col-sm-3 eq-box-sm">
						<div class="panel text-center">
							<h4>待回收</h4>
							<h3 class="panel-body" v-text="recycleOrder.waiting_recycle"></h3>
						</div>
					</div>
					
					<div class="col-sm-3 eq-box-sm">
						<div class="panel text-center">
							<h4>待确认</h4>
							<h3 class="panel-body" v-text="recycleOrder.waiting_confirm"></h3>
						</div>
					</div>
					
					<div class="col-sm-3 eq-box-sm">
						<div class="panel text-center">
							<h4>已完成</h4>
							<h3 class="panel-body" v-text="recycleOrder.completed"></h3>
						</div>
					</div>
				</div>
				<!--回收业务-->
			</div>
		</div>
	</div>
</div>

<!-- 模态框（Modal） -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
				<h4 class="modal-title" id="myModalLabel">导出数据</h4>
			</div>
			<div class="modal-body">
				<style>.fileds{margin:0 auto;width:260px;}.fileds>div{padding:10px 0;text-align: left;}</style>
				<div class="fileds">
					<div width="300">开始日期：<input id="start" type="text" readonly></div>
					<div>结束日期：<input id="end" type="text" readonly></div>
					<div>
						<label>上门：<input type="radio" name="repair_way" v-model="repair_way" value="1"></label>&nbsp;&nbsp;&nbsp;&nbsp;
						<label>到店：<input type="radio" name="repair_way" v-model="repair_way" value="2"></label>
					</div>
					<div><a
						:disabled="!start || !end" 
						style="display:inline-block;padding:10px 20px;border:1px solid #ccc;"
						target="_blank"
						href="{{api}}partner.php/Admin/Order/export_orderList_type1_excel?starttime={{start}}&endtime={{end}}&repair_way={{repair_way}}">导出</a></div>
				</div>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
			</div>
		</div><!-- /.modal-content -->
	</div><!-- /.modal-dialog -->
</div>
@@include('public/footer.html')
<script src="../../plugins/sparkline/jquery.sparkline.min.js"></script>
<script src="../../plugins/vue/vue.min.js"></script>
<script src="../../plugins/bootstrap-datetimepicker/bootstrap-datetimepicker.min.js"></script>
<script src="../../plugins/bootstrap-datetimepicker/bootstrap-datetimepicker.zh-CN.js"></script>
<script src="js/laydate/laydate.js"></script>
<script>
	var vue = new Vue({
		el:"#main",
		data:{
			recycleOrder:{},
			repairOrder:{},
			start:null,
			end:null,
			api:apiRecycle,
			repair_way:1
		},
		method:{
		
		},
		ready:function(){
			$.get(apiRecycle+"partner.php/Admin/Order/recycle_order_count", {}, function(res){
				vue.recycleOrder = res.data;
			}, "json");
		}
	});
	laydate({
		elem: '#start',
		format: 'YYYY-MM-DD',
		max: laydate.now(), //最大日期
		istoday: false,
		event: 'click',
		choose: function(datas){
			vue.start = datas;
		}
	});

	laydate({
		elem: '#end',
		format: 'YYYY-MM-DD',
		max: laydate.now(), //最大日期
		istoday: false,
		event: 'click',
		choose: function(datas){
			vue.end = datas;
		}
	});
</script>
</body>
</html>
